From: Hans van Kranenburg Date: Sat, 14 Jan 2023 23:40:49 +0000 (+0100) Subject: d/shuffle-boot-files: Also handle debug files X-Git-Tag: archive/raspbian/4.17.1+2-gb773c48e36-1+rpi1~1^2~48 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=ed93dfd87155863d3d01bb0e4a7d867b6df31440;p=xen.git d/shuffle-boot-files: Also handle debug files See the comment in the change for explanation. We do a fixup for file names in /boot already, but the files in /usr/lib/debug should get the same treatment! Closes: #995233 Signed-off-by: Hans van Kranenburg --- diff --git a/debian/shuffle-boot-files b/debian/shuffle-boot-files index 90a4eafb1b..8e4f1687f6 100755 --- a/debian/shuffle-boot-files +++ b/debian/shuffle-boot-files @@ -44,3 +44,37 @@ find "$t/boot" -type f -print | while read f; do tail="${basename#*$verstring}" cp -v "$f" "${dest}/${head}${version}-${flavour}${tail}" done + +# For /usr/lib/debug, we make similar changes to the file names, before we +# actually install them into the locations for our binary packages. +# +# After executing the upstream build process, we at first end up a situation +# that looks like the following (small part from 'tree' output): +# +# [...] +# ├── usr +# │ ├── lib +# │ │ ├── debug +# │ │ │ ├── usr +# │ │ │ │ └── lib +# │ │ │ │ └── xen-4.17 +# │ │ │ │ └── boot +# │ │ │ │ └── xen-shim-syms +# │ │ │ ├── xen-4.17.0.efi.map +# │ │ │ ├── xen-syms-4.17.0 +# │ │ │ └── xen-syms-4.17.0.map +# [...] +# +# In this case we also want to strip off the .0 (or e.g. .3-pre) so that +# the file names do not change when we do a package update with new +# upstream stable branch line code. We especially do want this to +# prevent filenames from changing during a stable security update. +# +# For consistency with the file names in boot/, we also add the flavour +# name here. So, for example xen-4.17.0.efi.map.gz is renamed to +# xen-4.17-amd64.efi.map.gz +find "$t/usr/lib/debug" -maxdepth 1 -name 'xen*' -type f -print | while read f; do + head="${f%$verstring*}" + tail="${f#*$verstring}" + mv -v "$f" "${head}${version}-${flavour}${tail}" +done